package MyStack;

import java.util.LinkedList;

public class MyStack {
	static LinkedList<Object> myStack = new LinkedList<>();
	static void push(Object obj) {
		myStack.add(obj);
	}
	static Object pop() {
		if(myStack.isEmpty()) {
			return null;
		}
		Object obj = myStack.getFirst();
		myStack.removeFirst();
		return obj;
	}
	static Object peek() {
		if(myStack.isEmpty()) {
			return null;
		}
		return myStack.getFirst();
	}
	static  boolean isEmpty() {
		return myStack.isEmpty();
	}
	static int size() {
		return myStack.size();
	}
	public static void main(String[] args) {
		System.out.println(pop()+" "+peek()+" "+isEmpty()+" "+size());
		push("a");
		push("b");
		push("c");
		System.out.print(size()+" "+pop()+" "+peek()+" "+isEmpty());
		
		
	}

}
